<?
require("config.php");
$langname = 'schedule_enroll';
require("header.php");
?>


<?

$table = "course_schedule";

$field = array(

"id",
"name",
"datedetails",
"time",
"venue",
"country",
"currency",
"fee",
"contact",
"contact_email",
"course",
	"currency1",
	"currency2",
	"currency3",
	"currency4",
	"currency5",
	"fee1",
	"fee2",
	"fee3",
	"fee4",
	"fee5",
	"description1",
	"description2",
	"description3",
	"description4",
	"description5",

);

$exp = "AND id=$id Limit 1";

$r = limitQuery($table,$field,$exp);

$id=$r[0][0];
$name=$r[0][1];
$datedetails=$r[0][2];
$time=$r[0][3];
$venue=$r[0][4];
$country=$r[0][5];
$currency=$r[0][6];
$fee=$r[0][7];
$contact=$r[0][8];
$contact_email=$r[0][9];
$course=$r[0][10];

	$Currency1= $r[0][11];
	$Currency2= $r[0][12];
	$Currency3= $r[0][13];
	$Currency4= $r[0][14];
	$Currency5= $r[0][15];
	$Fee1= $r[0][16];
	$Fee2= $r[0][17];
	$Fee3= $r[0][18];
	$Fee4= $r[0][19];
	$Fee5= $r[0][20];
	$Description1= $r[0][21];
	$Description2= $r[0][22];
	$Description3= $r[0][23];
	$Description4= $r[0][24];
	$Description5= $r[0][25];

?>












<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 

    <td width="186" valign="top"> 
      <?require("nav.php")?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td valign="top"> 
      <?require("menu.php")?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="right"><table width="100%" border="0">
              <tr> 
                <td height="50" class="header">&gt;&gt; Online Enroll</td>
              </tr>
            </table></td>
        </tr>
      </table>



<!--

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="daisyy@netvigator.com">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/images/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
-->



<script language="JavaScript"> 
<!-- 
function checkForm1(theform) { 

if (theform.Firstname.value=="") { 
    theform.Firstname.focus(); 
    alert("Please enter your First Name."); 
    return false; } 

if (theform.Famiry_name.value=="") { 
    theform.Famiry_name.focus(); 
    alert("Please enter your Family Name."); 
    return false; } 

if (theform.Tel.value=="") { 
    theform.Tel.focus(); 
    alert("Please enter your Tel."); 
    return false; } 

if (theform.Address.value=="") { 
    theform.Address.focus(); 
    alert("Please enter your Address."); 
    return false; } 


if (validate_email(theform.Email.value)== false){ 
    theform.Email.focus(); 
    alert("Invalid E-mail."); 
    return false; } 



}
//--> 
</script>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="13"><img src="images/c1.gif" width="13" height="37"></td>
                <td background="images/c5.gif"> <font color="#FFFFFF"> 
                  <?=$name?>
                  </font></td>
                <td width="13"><img src="images/c2.gif" width="13" height="37"></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="2" bgcolor="B1CAE8"><img src="images/shim.gif" width="2" height="1"></td>
                <td align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td bgcolor="F78D83"><img src="images/shim.gif" width="1" height="2"></td>
                    </tr>
                  </table>
                  <table width="96%" border="0" align="center" cellspacing="0" cellpadding="0">
                    <?if ($datedetails){?>
										<tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td width="100" height="24"> <b>Date</b></td>
                      <td width="82%" height="2"> 
                        <?=$datedetails?>
                      </td>
                    </tr>
					<tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td colspan="2" background="images/line.gif"><img src="images/shim.gif" width="1" height="1"></td>
                    </tr>
                    <?}?>
                    <?if ($time){?><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td height="24"> <b>Time</b></td>
                      <td> 
                        <?=$time?>
                      </td>
                    </tr><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td colspan="2" background="images/line.gif"><img src="images/shim.gif" width="1" height="1"></td>
                    </tr>
                    <?}?>
                    
                    <?if ($country){?><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td height="24"> <b>Country</b></td>
                      <td> 
                        <?=$country?>
                      </td>
                    </tr><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td colspan="2" background="images/line.gif"><img src="images/shim.gif" width="1" height="1"></td>
                    </tr>
                    <?}?>
                    
                    <?
	if ($fee==0){

		$Fee = "Free";

		$button = "Registration";

	}else{

		$Fee = "<i>$currency $fee</i>";

		$button = "Online Enroll";

	}
		
?><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <tr> 
                      <td height="24"><b>Fee</b></td>
                      <td> 
<?

for ($i=1;$i<6;$i++){

	$v1="Currency$i";
	$v2="Fee$i";
	$v3="Description$i";

	if ($$v2>0){
		echo $$v1 . " " . number_format($$v2,2) ." <span class=note>" . $$v3 . "</span><br>";
	}

}
?>
                      </td>
                    </tr><tr> 
                <td colspan="2" height="6"></td>
              </tr>
                    <?if ($contact){?>
                    <tr> 
                      <td colspan="2" background="images/line.gif"><img src="images/shim.gif" width="1" height="1"></td>
                    </tr>
                    <?}?>
                    
                    <?if ($contact_email){?>
                    <?}?>
                  </table>
                  <table width="96%" border="0" align="center" cellpadding="0" cellspacing="1">
                    <tr>
                      <td colspan="2" align="right">&nbsp;</td>
                    </tr>
                    <tr> 
                      <td width="99%" colspan="2" align="right"><a href="javascript:Redirect('training_schedule_detail.php?id=<?=$id?>',3)">Course 
                        details</a></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><b>&nbsp;</b></td>
                    </tr>
                  </table> 
                </td>
                <td width="2" bgcolor="B1CAE8"><img src="images/shim.gif" width="2" height="1"></td>
              </tr>
            </table></td>
        </tr>  
        <tr> 
          <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="6"><img src="images/c3.gif" width="6" height="6"></td>
                <td background="images/c7.gif"><img src="images/c7.gif" width="6" height="6"></td>
                <td width="6"><img src="images/c4.gif" width="6" height="6"></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <!--
<a href="https://www.paypal.com/xclick/business=daisyy%40acuityworld.com&item_name=sc313213&item_number=asdfasdf&amount=332.00&image_url=http%3A//www.acuityworld.com/en/images/logo1.gif&return=http%3A//www.acuityworld.com/en/paypal_success.php&cancel_return=http%3A//www.acuityworld.com/en/paypal_cancel.php&no_note=1&currency_code=USD">buy</a>
-->
      <form name="form1" method="post" action="enroll1_test2.php" onSubmit="return checkForm1(this)">
<input type="hidden" name="id" value="<?=$id?>">

<input type="hidden" name="Course" value="<?=$course?>">
<input type="hidden" name="Course1" value="<?=eregi_replace("&", "&amp;", $course);?>">

<input type="hidden" name="Schedule" value="<?=$name?>">
<input type="hidden" name="Schedule1" value="<?=eregi_replace("&", "&amp;", $name);?>">	
<input type="hidden" name="Datedetails" value="<?=$datedetails?>">
<input type="hidden" name="Time" value="<?=$time?>">
<input type="hidden" name="Venue" value="<?=$venue?>">
<input type="hidden" name="Currency" value="<?=$currency?>">
<input type="hidden" name="Fee" value="<?=$fee?>">


        <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
          <tr> 
            <td height="22" bgcolor="A0BBD6"><b>Personal Information</b></td>
          </tr>
          <tr> 
            <td> <input type="text" name="Firstname" size="30" class="text"> <font color="red">*</font>First 
              Name </td>
          </tr>
          <tr> 
            <td> <input type="text" name="Famiry_name" size="30" class="text"> 
              <font color="red"> *</font>Family Name</td>
          </tr>
          <tr> 
            <td> <input type="text" name="Tel" size="30" class="text"> <font color="red">*</font>Tel 
            </td>
          </tr>
          <tr> 
            <td> <input type="text" name="Fax" size="30" class="text">
              Fax </td>
          </tr>
          <tr> 
            <td> <input type="text" name="Address" size="30" class="text"> <font color="red">*</font>Address 
            </td>
          </tr>
          <tr> 
            <td> <input type="text" name="Email" size="30" class="text"> <font color="red">*</font>E-mail 
              <font size="1">(should be correct address you can receive our confirmation 
              email)</font></td>
          </tr>
          <tr> 
            <td> <input type="text" name="Profession" size="30" class="text">
              Profession </td>
          </tr>
          <tr> 
            <td> <input type="text" name="Education" size="30" class="text">
              Education </td>
          </tr>

          <tr> 
            <td> <TEXTAREA NAME="Remark" ROWS="6" COLS="40" class="text"></TEXTAREA>
              Remark </td>
          </tr>

          <tr> 
            <td>&nbsp;</td>
          </tr>

          <tr> 
            <td height="22" bgcolor="A0BBD6"><b>Course Fee</b></td>
          </tr>
          <tr> 
            <td>
<?

for ($i=1;$i<6;$i++){

	$v1="Currency$i";
	$v2="Fee$i";
	$v3="Description$i";


	if ($$v2>0){
		if ($value!==1){
			$checkIt="CHECKED";
			$value=1;
		}else{
			$checkIt="";
		}
		echo "<input type=\"radio\" name=\"Fee\" value=\"$i\" $checkIt>" . $$v1 . " " . number_format($$v2,2) ." <span class=note>" . $$v3 . "</span><br>";
	}
}

?>			
			</td>
          </tr>
		 
<!--
          <tr> 
            <td height="22" bgcolor="A0BBD6"><b>Payment Method</b></td>
          </tr>

          <tr> 
            <td>We accept credit card payment only. Our online payment is supported by Pay Pal. <BR><BR><img src="images/paypal_logo.gif" border="0">

			<input type="hidden" name="Payment_method" value="Credit Card">

			
			</td>
          </tr>

          <tr> 
            <td height="22" bgcolor="#78BCFF"><b>Payment Method</b></td>
          </tr>
          <tr> 
            <td> <input type="radio" name="Payment_method" value="Mail Check" checked>
              Mail Check </td>
          </tr>
          <tr> 
            <td> <input type="radio" name="Payment_method" value="Credit Card">
              Credit Card</td>
          </tr>
          <tr> 
            <td> <input type="radio" name="Payment_method" value="Other">
              Others 
              <input type="text" name="Other" size="30" class="text"> </td>
          </tr>
-->

          <tr> 
            <td>&nbsp;</td>
          </tr>
		  <!--
          <tr> 
            <td>Amount : 
              <?=$currency?>
              <?=number_format($fee,2)?>
            </td>
          </tr>
		  -->
          <tr> 
            <td>&nbsp;</td>
          </tr>


<!--
          <tr> 
            <td bgcolor="#CCCCCC"><b>Credit Card Information</b></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td> <input type="text" name="Cardname" size="30" class="text">
              Name on card</td>
          </tr>
          <tr> 
            <td> <input type="text" name="Cardno" size="30" class="text">
              Card no.</td>
          </tr>
          <tr> 
            <td> 
              <?

$sourceData = array(
  "Visa",
  "American Express",
  "Master",
  );

FFPSelectBox("Cardtype",$Status,$sourceData,$sourceLabel);

?>
            </td>
          </tr>




          <tr> 
            <td>
              <?=FFPtime(Date("Y-m-d"))?>
              Expiration date</td>
          </tr>

-->


          <tr> 
            <td height="52">&nbsp;</td>
          </tr>
          <tr> 
            <td> <input type="Reset" name="Reset" value="Cancel" class="button"> 
              <input type="submit" name="Submit3" value="Check out" class="button"> 
            </td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
          </tr>
        </table>
      </form>
      <br>
      <br> </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td width="173" valign="top">
	
	
<?require("list.php")?>	 
	  
	  
    </td>

  </tr>
</table>





<?require("footer.php")?>	